module.exports = app => {
  const { router, controller, middleware } = app;
  const { auth } = middleware;

  // 获取信息
  router.get('/dept/:id/form', auth(), controller.dept.deptForm);
  // 树
  router.get('/dept', auth(), controller.dept.tree);
  // 下拉列表
  router.get('/dept/options', auth(), controller.dept.options);

  // 添加
  router.post('/dept', auth(), controller.dept.save);

  // 修改
  router.put('/dept/:id', auth(), controller.dept.save);

  // 删除
  router.delete('/dept/:id', auth(), controller.dept.remove);
};
